﻿/*
 完成时间：2013年8月11日 13:05:43
 脚本功能：大陆移动卷轴
 */
var isopenvip = false;
var icon = "#fEffect/CharacterEff/1082565/0/0#";
var b = "#fUI/Basic/LevelNo/0#"; //[1]+1
var c = "#fUI/Basic/LevelNo/1#"; //[1]+1
var d = "#fUI/Basic/LevelNo/2#"; //[1]+1
var e = "#fUI/Basic/LevelNo/3#"; //[1]+1
var f = "#fUI/Basic/LevelNo/4#"; //[1]+1
var g = "#fUI/Basic/LevelNo/5#"; //[1]+1
var Icon ="#fUI/UIWindowBT.img/WorldMap/BtNext/normal/0#"
var IconA = "#fEffect/CharacterEff/1082565/0/0#"; //饼干兔子
var IconB = "#fUI/UIMiniGame/starPlanetRPS/heart#";//红心桃心
var Icon1 ="#fUI/StarCityUI.img/GradeInfo/icon_ss/2#"
var Icon2 ="#fUI/UIPVP.img/MiniMapIcon/yellow#"
var q6 ="#fUI/RunnerGame.img/RunnerGameUI/UI/Point/2#"
var e ="#fUI/UIPVP.img/MiniMapIcon/red#"
var e1 ="#fUI/UIPVP.img/MiniMapIcon/blue#"
var e2 ="#fUI/UIPVP.img/MiniMapIcon/yellow#"
var e3 ="#fUI/UIPVP.img/UserRanking/NumRank/iceKnight#"
var s = "#fUI/UIWindow2.img/Quest/quest_info/summary_icon/startcondition#"; //开始条件
var s1 = "#fUI/RunnerGame/RunnerGameUI/Effect/ItemEffect_Protect1/3#";//女神
var s2 = "#fUI/UIWindow2/ToolTip/Equip/Star/Star2#";//星星
var s3 = "#fUI/UIWindow2/AdditionalOptionTooltip/epic#";//A图标
var s4 = "#fUI/UIWindow2/AdditionalOptionTooltip/unique#";//S图标


var monstermaps = Array(
        Array(1, "---------------冲级BOSS------------"),
        Array(211042300, "　　「」三阶扎昆　      「」　"),
        Array(230040410, "　　「」水下鱼王　      「」"),
        Array(240040700, "　　「」暗黑龙王　      「经验，项链」"),
        Array(1, "---------------普通BOSS----------"),
        Array(223030200, "　　「」心疤痕狮王　「」"),
        Array(270050000, "　　「」品克缤　「饰品」"),
        Array(300030300, "　　「」妖精女王　「戒指」"),
        Array(272030300, "　　「」啊卡伊勒　「各种币」"),
        Array(211070000, "　　「」狮子王　「140狮心套」"),
        Array(1, "---------------游戏BOSS----------"),
        Array(703020000, "　　「」钻机　「」"),
        Array(811000008, "　　「」浓姬　「」"),
        Array(807300100, "　　「」森蓝丸　「」"),
        Array(1, "---------------高级BOSS----------"),
        Array(271030600, "　　「」希纳斯　「」"),
        Array(970072200, "　　「」乌鲁斯　「」"),
        Array(262030000, "　　「」希腊女神　「」"),
        Array(105200000, "　　「」鲁塔比斯　「FFN套，武器」"),
        Array(863000100, "　　「」贝勒德　「」"),
        Array(401060000, "　　「」暴君城堡　「」"),
        Array(1, "---------------终极BOSS----------"),
        Array(992000000, "　　「」桃乐丝　「」"),
        Array(350060300, "　　「」斯乌小姑娘　「」"),
        Array(105300303, "　　「」黛米安　「」"),
        Array(450004000, "　　「」路西德　「」"),
        Array(800026000, "　　「」天狗　「」"),
        Array(1, "---------------------------------")
        );



var MapOther = Array(
        Array(100000104, "[ 射手村造型区 ]")
        );

var a = 0;
var selects = 0;
var MapType;

function start() {
    a = -1;
    action(1, 0);
}

function action(mode, type, selection) {
    if (mode == -1) {
        cm.dispose();
    } else {
        if (mode == 1)
            a++;
        else {
            cm.dispose();
            return;
        }
        if (a == -1) {
            cm.dispose();
        } else if (a == 0) {
           // var txt = "\r\n" + e + e1 + e2 + e + e1 + e2 + e + e1 + e2 + e + e1 + e2 + e + e1 + e2 + e + e1 + e2 + e + e1 + e2 + e + e1 + e2 + e + e1 + e2 + "\r\n\r\n";
            var txt = "\r\n\r\n";
            txt += "    #d#e「 #r#h ##d 」- 多方位人性化设计-请选择地方:#k#n\r\n";

            txt += "#r#L1#" + s1 + " 世界各地BOSS---进入挑战 #l#k\r\n";

            cm.sendSimpleS(txt, 2);
        } else if (a == 1) {
            var text = "请选择你要接连的地方：\r\n#d"
            switch (selection) {
                case 0:
                    for (var i = 0; i < townmaps.length; i++) {
                        text += "#L" + i + "# " + icon + townmaps[i][1];
                    }
                    MapType = 0
                    needMoney = true;
                    break;
                case 1:
                    for (var i = 0; i < monstermaps.length; i++) {
                        text += "#L" + i + "#  " + icon + " " + monstermaps[i][1] + "\r\n";
                    }
                    MapType = 1
                    break;
                case 2:
                    for (var i = 0; i < lmaps.length; i++) {
                        text += "#r#L" + i + "# " + " " + lmaps[i][1];
                    }
                    MapType = 2
                    needMoney = true;
                    break;
                case 3:
                    for (var i = 0; i < tiaotiaomaps.length; i++) {
                        text += "#L" + i + "# " + icon + " #m" + tiaotiaomaps[i] + "# (" + tiaotiaomaps[i][1] + ")\r\n"
                    }
                    MapType = 3
                    needMoney = true;
                    break;

                case 4://家务中心
                    for (var i = 0; i < MapHousework.length; i++) {
                        text += "#L" + i + "# " + icon + " #m" + MapHousework[i] + "# (" + MapHousework[i][1] + ")\r\n"
                    }
                    MapType = 4
                    needMoney = true;
                    break;

                case 5://射手造型
                    for (var i = 0; i < MapOther.length; i++) {
                        text += "#L" + i + "# " + icon + " #m" + MapOther[i] + "# (" + MapOther[i][1] + ")\r\n"
                    }
                    MapType = 5
                    needMoney = true;
                    break;
	            case 7:
					cm.warp(931000500);
                    break;
				case 6:
					cm.warp(910150210);
                    break;
            }
            cm.sendSimple(text);
        } else if (a == 2) {
            selects = selection;
            cm.sendYesNo("在这里的事情办完了吗？确定要去你像要去的地方了吗？");
        } else if (a == 3) {
            if (cm.getVip() == 0 || !isopenvip) {
                if (cm.getMeso() < 500) {
                    cm.sendOk("对不起，你的金币不足。\r\n需要500金币才能进行。");
                    cm.dispose();
                    return;
                } else {
                    cm.gainMeso(-500);
                }
            }

            switch (MapType) {
                case 0:
                    cm.warp(townmaps[selects][0]);
                    break;
                case 1:
                    cm.warp(monstermaps[selects][0]);
                    break;
                case 2:
                    cm.warp(lmaps[selects][0]);
                    break;
                case 3:
                    cm.warp(tiaotiaomaps[selects][0]);
                    break;
                case 4://家务中心
                    cm.warp(MapHousework[selects][0]);
                    break;
                case 5://射手造型
                    cm.warp(MapOther[selects][0]);
                    break;
            }

            cm.dispose();
        }//a
    }//mode
}//f
